<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
    <div id="app">
      <!-- vue的绑定事件 可以同时触发多个函数 -->
      <div @click="test1(),test2(),test3()">多个函数触发</div>
      <!-- vue的事件对象 有特殊传递符
      $event -->
      <div @click="run($event,'参数')" @mouseover="eat()">
        绑定不同的时间
      </div>
      <input type="text" @keydown="write($event)"> 
    </div>
    <script src="./vue.js"></script>
    <script>
      new Vue({
        el:"#app",
        data(){
          return {}
        },
        methods: {
          test1(){
            console.log(1)
          },
          test2(){
               console.log(2)
          },
          test3(){
               console.log(3)
          },
          run(e,can){
            console.log(e)
              console.log("点击")
              e.target.style.background="red"
          },
          eat(){
            console.log("移入")
          },
          write(e){
            // 键盘事件e.keycode 键盘编码
            console.log(e)
          }
        },
      })
    </script>
</body>
</html>